// Board.h: interface for the CBoard class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BOARD_H__0A7C7F44_F8C1_46C1_A9E7_179832FC8511__INCLUDED_)
#define AFX_BOARD_H__0A7C7F44_F8C1_46C1_A9E7_179832FC8511__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CBoard  
{
public:
	CBoard();
	CBoard(int sizeX, int sizeY);
	virtual ~CBoard();

	void	Init();
	int		Solve();
	void	PrintBoard();

private:
	tCell*	m_pBoard;
	int*	m_pLeftPane;
	int*	m_pTopPane;
	int		m_Width;
	int		m_Height;
	bool	m_bFindMultipleSolutions;

	tCell*	GetCell(int x, int y);
	void SetCell(int x, int y, tCell* pCell);

	void SetTopPane(int y, int x, int N);
	int GetTopPane(int y, int x);

	void SetLeftPane(int x, int y, int N);
	int GetLeftPane(int x, int y);
	int ValidateRow(int y);
	int ValidateCol(int x);
	int CombineRow(int rowY);

};

#endif // !defined(AFX_BOARD_H__0A7C7F44_F8C1_46C1_A9E7_179832FC8511__INCLUDED_)
